Hi all, |
Re: Filter limit??
I think the problem might not be the filter definition but the concatenation of all those filters. Remember when you do: Filter f1 = (attribute "Absolute Number" != "123") f1 &= (attribute "Absolute Number" != "124") // ...
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Filter limit??
I think the problem might not be the filter definition but the concatenation of all those filters. Remember when you do: Filter f1 = (attribute "Absolute Number" != "123") f1 = f1 && (attribute "Absolute Number" != "124") // ...
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Filter limit?? Thanks so much. I had already opened up the stack, and it didn't help. But splitting the filter into two parts and then joining them back together works nicely. Simple solution, but I was basically brain dead at that point and couldn't see the solution. Works great now. Thanks again! -Steve |
Re: Filter limit?? I would like to come back to this topic because of its title. Does anybody know if there is a limit for the size of a filter string, or for the number of simple filter expressions to be combined to a complex filter expression? Karl |
Re: Filter limit?? kabr - Thu May 12 04:00:15 EDT 2011
In fact I don't know, but it should not be hard to test...
pragma runLim, 0
int maxSize = 1000
Filter F
string errMsg
Module m = null
if (!null (errMsg = create("Filter Test Module", "", "PREF_", 1, m) ) || null m) error "Cannot create module: " errMsg "\n"
current = m
showExplorer false
int curSize; for curSize in 1:maxSize do {
create m
print "Checking for " curSize " elements ... "
if (curSize == 1) {
F = attribute "Absolute Number" == curSize ""
} else {
F = F or attribute "Absolute Number" == curSize ""
}
int timeStart = getTickCount_
set F; filtering on;
int timeEnd = getTickCount_ - timeStart
iCount = 0; Object o; for o in m do iCount ++
print "Filtered " iCount " elements in " timeEnd " ms."
if (iCount == curSize) print "OK.\n" else print "### NOT OK ###\n"
}
downgrade m; close m
softDelete module "Filter Test Module"
hardDelete module "Filter Test Module"
Checking for 1 elements ... Filtered 1 elements in 0 ms.OK. Checking for 2 elements ... Filtered 2 elements in 0 ms.OK. Checking for 3 elements ... Filtered 3 elements in 15 ms.OK. ... Checking for 649 elements ... Filtered 649 elements in 125 ms.OK. Checking for 650 elements ... Filtered 650 elements in 140 ms.OK. Checking for 651 elements ... Filtered 651 elements in 141 ms.OK. ... Checking for 998 elements ... Filtered 998 elements in 250 ms.OK. Checking for 999 elements ... Filtered 999 elements in 250 ms.OK. Checking for 1000 elements ... Filtered 1000 elements in 266 ms.OK.
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Filter limit?? Mathias Mamsch - Thu May 12 06:30:00 EDT 2011
In fact I don't know, but it should not be hard to test...
pragma runLim, 0
int maxSize = 1000
Filter F
string errMsg
Module m = null
if (!null (errMsg = create("Filter Test Module", "", "PREF_", 1, m) ) || null m) error "Cannot create module: " errMsg "\n"
current = m
showExplorer false
int curSize; for curSize in 1:maxSize do {
create m
print "Checking for " curSize " elements ... "
if (curSize == 1) {
F = attribute "Absolute Number" == curSize ""
} else {
F = F or attribute "Absolute Number" == curSize ""
}
int timeStart = getTickCount_
set F; filtering on;
int timeEnd = getTickCount_ - timeStart
iCount = 0; Object o; for o in m do iCount ++
print "Filtered " iCount " elements in " timeEnd " ms."
if (iCount == curSize) print "OK.\n" else print "### NOT OK ###\n"
}
downgrade m; close m
softDelete module "Filter Test Module"
hardDelete module "Filter Test Module"
Checking for 1 elements ... Filtered 1 elements in 0 ms.OK. Checking for 2 elements ... Filtered 2 elements in 0 ms.OK. Checking for 3 elements ... Filtered 3 elements in 15 ms.OK. ... Checking for 649 elements ... Filtered 649 elements in 125 ms.OK. Checking for 650 elements ... Filtered 650 elements in 140 ms.OK. Checking for 651 elements ... Filtered 651 elements in 141 ms.OK. ... Checking for 998 elements ... Filtered 998 elements in 250 ms.OK. Checking for 999 elements ... Filtered 999 elements in 250 ms.OK. Checking for 1000 elements ... Filtered 1000 elements in 266 ms.OK.
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
this is basically what I wanted to know. At least I now know that in DXL I can build a filter that big and apply it. From the filter dialog this does not seem to work. I have one user who tried to build a filter with 72 criteria and DOORS refused to compute the result. And yes, for my own purposes I would probably use accept and reject in a DXL script but users do not have the rights to edit DXL in our database. rgds Karl |
Re: Filter limit?? kabr - Thu May 12 08:00:07 EDT 2011 By the way there is another flaw in the test script. Since the objects are created one by one and the filter is actually trying to show ALL objects, there could be a possibility where the filter would just not work at all (all objects are shown) and still the program would show "ok". So you might want to move the object creation loop outside of the filter loop. Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |